package com.ddt;

import com.qiyou.javaelf.system.Elf;
import org.jawin.COMException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;
import java.util.Objects;

public class User{
    static final Logger logger = LoggerFactory.getLogger(Main.class);
    private String name;
    private int hwnd;
    private Elf elf;
    private MatchColor mc;
    private String path;

    public User(String name, int hwnd) throws COMException, IOException {
        this.name = name;
        this.hwnd = hwnd;
        this.elf = new Elf();
        this.mc = new MatchColor(elf);
        this.path = "./image/";
        String resPath = elf.GetPath();
        logger.info("GetPath :{}",resPath);
        this.elf.SetPath(new File(this.path).getCanonicalPath());

    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getName() {
        return name;
    }

    public MatchColor getMc() {
        return mc;
    }

    public void setMc(MatchColor mc) {
        this.mc = mc;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHwnd() {
        return hwnd;
    }

    public void setHwnd(int hwnd) {
        this.hwnd = hwnd;
    }

    public Elf getElf() {
        return elf;
    }

    public void setElf(Elf elf) {
        this.elf = elf;
    }
}
